import { Auth } from "@/common"

const user = {
    state: {
        token: Auth.getToken(),
        userInfo: {},
        roles: []
    },
    mutations: {
        SET_TOKEN: (state, token) => {
            state.token = token;
        },
        SET_USER_INFO: (state, userInfo) => {
            state.userInfo = userInfo;
        },
        SET_ROLES: (state, roles) => {
            state.roles = roles;
        }
    },
    actions: {}
}
export default user